package com.icode.web.socket.tomcat7;

import org.apache.catalina.websocket.MessageInbound;

import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;

/**
 * Created with IntelliJ IDEA.
 * User: ZhongGang
 * Date: 14-7-27
 * Time: 下午11:03
 */
public class ChatMessageInbound extends MessageInbound {

    @Override
    protected void onBinaryMessage(ByteBuffer message) throws IOException {
        throw new UnsupportedOperationException("Not yet implemented!");
    }

    @Override
    protected void onTextMessage(CharBuffer message) throws IOException {
        getWsOutbound().writeTextMessage(message);
    }
}
